<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /* async => 异步的 */
        /* await => 等待 */
        /* async,await 修饰的是  是generator的一个语法糖*/

        /* async await 联合Promise一起使用 */

        async function fn() {
            await console.log("1111111");
            await new Promise((resolve, reject) => {
                setTimeout(() => {
                    console.log("2222222");
                }, 1000);
            })
            await console.log("33333333");
        }
        fn();
    </script>
</body>

</html>